<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../vue.js"></script>
</head>

<body>
    <div id="app">
        <input type="text" v-model='vmodel'>
        <input type="button" @click='vclick' value="提交">
        <ul>
            <li v-for='item in list'>{{item}}</li>
        </ul>
    </div>

    <script>
        const app = new Vue({
            el: '#app',
            data: {
                list: [],
                vmodel: ''
            },
            methods: {
                vclick: function () {
                    this.list.push(this.vmodel);
                    this.vmodel = '';
                }
            },
        })
    </script>
</body>

</html>